// 添加房源
import React, { useState, useEffect } from "react";
// 引入样式（隔离了）
import addAProperty from "./AddListings.module.css";
import { Tabs } from "antd";
import PropertyInfo2 from "./components/PropertyInfo2";
import SupportInfo from "./components/SupportInfo";

const tabsList = [
  {
    key: "1",
    label: `楼盘信息1`,
  },
  {
    key: "2",
    label: `配套信息2`,
  },
];

function AddListings() {
  let [activeTab, setActiveTab] = useState("1");
  const changeTab = (key) => {
    setActiveTab(key);
  };
  return (
    <div className={addAProperty.page}>
      <Tabs defaultActiveKey="1" items={tabsList} onChange={changeTab} />
      <div>{activeTab === "1" ? <PropertyInfo2 /> : <SupportInfo />}</div>
    </div>
  );
}

export default AddListings;
